import nltk
import sys

porter = nltk.stem.PorterStemmer()
lancaster = nltk.stem.LancasterStemmer()
tokenizer = nltk.PunktWordTokenizer()

for lines in open('a.txt'): #sys.stdin:
    toks = tokenizer.tokenize(lines)
    o = [ (porter.stem(x), lancaster.stem(x)) for x in toks if porter.stem(x) != lancaster.stem(x) ]
    for i in o:
        print i

            
